<template>
<view class="shopping-details app-pages">
	<view class="app-background-fixed"></view>
	<view class="swiper">
		<u-swiper :list="banner" circular></u-swiper>
	</view>
	<view class="cell">
		<view class="cell-item">
			<view class="cell-title">端午粽子礼盒</view>
			<view class="cell-price app-pirce-color">
				<text style="font-size: 24rpx;">￥</text>
				<text style="font-size: 30rpx;">200.00</text>
			</view>
			<view class="cell-tips1">门店：复兴路</view>
			<view class="cell-tips2">
				<view class="cell-tips2-view">
					<u-icon name="checkmark-circle" color="#666666" size="30rpx" ></u-icon>
					<text class="cell-tips2-text">自提</text>
				</view>
				<view class="cell-tips2-view" style="margin-left: 50rpx;">
					<u-icon name="close-circle" color="#666666" size="30rpx" ></u-icon>
					<text class="cell-tips2-text">配送</text>
				</view>
			</view>
		</view>
		<view class="cell-item">
			<view class="row">
				<text class="row-title">规则</text>
				<view class="row-content">12个、份</view>
			</view>
			<view class="row">
				<text class="row-title">数量</text>
				<view class="row-content">
					<u-icon name="minus" @click="numb--" color="#666666" size="24rpx" ></u-icon>
					<view class="row-numb">{{numb}}</view>
					<u-icon name="plus" @click="numb++" color="#666666" size="24rpx" ></u-icon>
				</view>
			</view>
		</view>
		<view class="cell-item">
			<view class="cell-title">端午粽子礼盒</view>
			<view class="row" style="margin-top: 30rpx;">
				<text class="row-title row-title-lang">商品描述</text>
				<view class="row-content">豆沙*2、瘦肉*6</view>
			</view>
			<view class="row">
				<text class="row-title row-title-lang">原料</text>
				<view class="row-content">糯米</view>
			</view>
			<view class="row">
				<text class="row-title row-title-lang">备注</text>
				<view class="row-content" style="height: 100rpx;"></view>
			</view>
		</view>
		
		<view class="btn app-pages">
			<u-icon name="shopping-cart" @click="goShopping" color="#666666" size="80rpx" ></u-icon>
			<view class="btn-view">
				<view class="submit">加入购物车</view>
				<view class="submit" @click="handleRouter('/homePages/orderSubmit/index')">立即购买</view>
			</view>
		</view>
	</view>
</view>
</template>
<script>
	export default {
		name:'ShoppingDetails',
		data() {
			return {
				numb: 1,
				banner: [
					'https://cdn.uviewui.com/uview/swiper/swiper1.png',
					'https://cdn.uviewui.com/uview/swiper/swiper2.png',
					'https://cdn.uviewui.com/uview/swiper/swiper3.png',
				],
			}
		},
		methods: {
			goShopping(){
				uni.reLaunch({
					url:'/pages/shoppingCart/index'
				})
			},
			handleRouter(url) {
				uni.navigateTo({
					url
				})
			}
		},
	}
</script>
<style lang="scss" scoped>
	.shopping-details{
		padding-bottom: calc(120rpx + env(safe-area-inset-bottom));
		.swiper{
			margin-top: 10rpx;
		}
		.btn{
			position: fixed;
			bottom: 0;
			left: 0;
			right: 0;
			height: 120rpx;
			display: flex;
			align-items: center;
			z-index: 1;
			justify-content: space-between;
			font-size: 28rpx;
			background-color: #FFFFFF;
			border-top: 2rpx solid #f2f2f2;
			padding-bottom: env(safe-area-inset-bottom);
			.btn-view{
				display: flex;
				align-items: center;
				justify-content: center;
			}
			.submit{
				padding: 15rpx 35rpx;
				border-radius: 4rpx;
				color: #FFFFFF;
				&+.submit{
					margin-left: 10rpx;
				}
				&:nth-child(1){
					background-color: rgba(255, 149, 2, 1);
				}
				&:nth-child(2){
					background-color: #f74062;
				}
			}
		}
		.cell{
			.cell-item {
				margin-top: 20rpx;
				box-shadow: 0px 0px 10rpx rgba(0, 0, 0, 0.1);
				background-color: #FFFFFF;
				padding: 30rpx 40rpx;
				box-sizing: border-box;
				border-radius: 15rpx;
				.row{
					display: flex;
					font-size: 24rpx;
					&+.row{
						margin-top: 20rpx;
					}
					.row-title{
						font-size: 24rpx;
						color: #666666;
						width: 80rpx;
					}
					.row-title-lang{
						width: 150rpx;
					}
					.row-content{
						display: flex;
						align-items: center;
						justify-content: center;
						.row-numb{
							width: 80rpx;
							text-align: center;
						}
					}
				}
				.cell-price{
					margin: 30rpx 0 20rpx 0;
				}
				.cell-tips1{
				}
				.cell-tips2{
					padding-top: 12rpx;
					display: flex;
					color: #666666;
					.cell-tips2-view{
						display: flex;
						align-items: center;
						.cell-tips2-text{
							margin-left: 4rpx;
						}
						&+.cell-tips2-view{
							margin-left: 10rpx;
						}
					}
				}
				.cell-title {
					padding-bottom: 10rpx;
					box-sizing: border-box;
					font-size: 30rpx;
				}
			}
		}
	}
</style>